home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / media / pov / scenes / other / clouds.pov < prev    next >
Encoding:
Text File  |  1994-10-02  |  2.0 KB  |  96 lines

  1. //
  2. // Every now and then I've tried to create a realistic cloud texture.
  3. // I finally feel like I've succeeded :-).
  4. // 
  5. // Jussi Kantola (jkantola@paju.oulu.fi)
  6. //
  7.  
  8. #include "colors.inc"
  9. #include "textures.inc"
  10.  
  11. #declare Sky_Top = 100  // The distance from ground to the top of the sky
  12.  
  13. // A few different color_maps for the clouds, all of these are ok.
  14.  
  15. #declare Colors1 = color_map
  16.    {
  17.    [0.0 0.1 color rgb <2/3, 2/3, 1> color rgb <2/3, 2/3, 1>]
  18.    [1.0 color White]
  19.    }
  20.  
  21. #declare Colors2 = color_map  // Realistic
  22.    {
  23.    [0.0 0.1 color SkyBlue color SkyBlue]
  24.    [1.0 color White]
  25.    }
  26.  
  27. #declare Colors3 = color_map  // Very realistic!
  28.    {
  29.    [0.0 0.1 color SkyBlue color SkyBlue]
  30.    [0.70 color rgb <4/5, 4/5, 5/6>]
  31.    [1.0 color White]
  32.    }
  33.  
  34. #declare Storm = color_map  // looks quite heavy with SkyColor in the lower layer!
  35.    {
  36.    [0.0 0.1 color Clear color Clear]
  37.    [0.70 color rgbf <4/5, 4/5, 5/6, 1/2>]
  38.    [1.0 color White]
  39.    }
  40.  
  41. #declare CloudSky = texture  // this is the cloud texture
  42.    {
  43.    pigment
  44.       {
  45.       bozo
  46.       turbulence 0.5
  47.       octaves 3   // doesn't have much effect
  48.       lambda 6    // bigger values are worth trying
  49.       color_map { Colors3 }
  50.       }
  51.    finish { ambient 1 diffuse 0 }
  52.    scale 1/6   // please notice
  53.    }
  54.   
  55. camera
  56.    {
  57.    location <0, 1, -5>
  58.    right 4/3*x
  59.    direction z
  60.    up y
  61.    look_at <0, 1, 0>
  62.    }
  63.  
  64. light_source { <3, 8, -2> color rgb <1, 1, 1> }
  65. light_source { <1, 4, -6> color rgb <1, 1, 1> }
  66.  
  67. plane    // a ground plane
  68.    {
  69.    y, 0
  70.    pigment
  71.       {
  72.       hexagon
  73.          color rgb <1, 1, 1>
  74.          color rgb <2/3, 1/3, 1/3>
  75.          color rgb <1/3, 0, 0>
  76.       }
  77.    finish { ambient 0.05 diffuse 0.95 brilliance 3 }
  78.    }
  79.  
  80. sphere  // something to stare at, a bumpy mirror sphere
  81.    {
  82.    <0, 1, 0>, 1
  83.    pigment { color White }
  84.    normal { bumps 3/4 scale 1/10 }
  85.    finish { Mirror }
  86.    }
  87.  
  88. sphere  // the sky globe -- please notice the scalings!
  89.    {
  90.    <0, 0, 0>, 1
  91. //   texture { pigment { color SkyBlue } }
  92.    texture { CloudSky }
  93.    scale <Sky_Top*10, Sky_Top, Sky_Top*10>
  94.    }
  95.  
  96.